package com.joplus.housekeeper.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by ccm on 2016/10/18 16:28
 */

public class NotifyListBean implements Parcelable {

    /**
     * code : 2000
     * data : [{"msgCategory":"管家推荐","msgDate":"2017-06-15 20:07:00","pushMsg":"11111","msgCategoryType":"1","unreadNum":"2"},{"msgCategory":"系统通知","msgDate":null,"pushMsg":null,"msgCategoryType":"3","unreadNum":null}]
     * message : 查询成功
     */

    private String code;
    private String message;
    private List<DataBean> data;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Parcelable {
        /**
         * msgCategory : 管家推荐
         * msgDate : 2017-06-15 20:07:00
         * pushMsg : 11111
         * msgCategoryType : 1
         * unreadNum : 2
         */

        private String msgCategory;
        private String msgDate;
        private String pushMsg;
        private String msgCategoryType;
        private String unreadNum;

        public String getMsgCategory() {
            return msgCategory;
        }

        public void setMsgCategory(String msgCategory) {
            this.msgCategory = msgCategory;
        }

        public String getMsgDate() {
            return msgDate;
        }

        public void setMsgDate(String msgDate) {
            this.msgDate = msgDate;
        }

        public String getPushMsg() {
            return pushMsg;
        }

        public void setPushMsg(String pushMsg) {
            this.pushMsg = pushMsg;
        }

        public String getMsgCategoryType() {
            return msgCategoryType;
        }

        public void setMsgCategoryType(String msgCategoryType) {
            this.msgCategoryType = msgCategoryType;
        }

        public String getUnreadNum() {
            return unreadNum;
        }

        public void setUnreadNum(String unreadNum) {
            this.unreadNum = unreadNum;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.msgCategory);
            dest.writeString(this.msgDate);
            dest.writeString(this.pushMsg);
            dest.writeString(this.msgCategoryType);
            dest.writeString(this.unreadNum);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.msgCategory = in.readString();
            this.msgDate = in.readString();
            this.pushMsg = in.readString();
            this.msgCategoryType = in.readString();
            this.unreadNum = in.readString();
        }

        public static final Parcelable.Creator<DataBean> CREATOR = new Parcelable.Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.code);
        dest.writeString(this.message);
        dest.writeTypedList(this.data);
    }

    public NotifyListBean() {
    }

    protected NotifyListBean(Parcel in) {
        this.code = in.readString();
        this.message = in.readString();
        this.data = in.createTypedArrayList(DataBean.CREATOR);
    }

    public static final Parcelable.Creator<NotifyListBean> CREATOR = new Parcelable.Creator<NotifyListBean>() {
        @Override
        public NotifyListBean createFromParcel(Parcel source) {
            return new NotifyListBean(source);
        }

        @Override
        public NotifyListBean[] newArray(int size) {
            return new NotifyListBean[size];
        }
    };
}
